<?php

/**
 * Description of Helpers_Base_Paginator
 *
 * @author a.novikov
 */
abstract class Helpers_Base_Paginator extends Helpers_Base {

	/**
	 *
	 * @return array
	 */
	protected function getPaginatorParams() {
		$per_page = (int)$this->_getParam('per_page', 20);
		if (isset($_COOKIE['per_page'])) {
			$per_page = $_COOKIE['per_page'];
		}
		
		return array(
			'page'			=> (int)$this->_getParam('page', 1),
			'per_page'		=> $per_page,
			'range_page'	=> 8
		);
	}
}